Various embodiments of this disclosure relate to managing frame queues and, more particularly, to improving available frame queue processing.
A frame is a block of real memory. Available frame queues (AFQs) are queues of references to frames and are designed to satisfy frame requests when storage space is needed. Due to the use of an AFQ, a computer system can avoid a linear search of storage to find available frames, because available frames are referenced on the AFQ. Thus, when virtual memory is accessed for data not yet in real memory, a frame request is generated, and in response to the request, the computer system may simply dequeue a frame reference from the AFQ.
There are instances where a frame request asks for more than a single frame. In this case, the computer system must access the AFQ for a longer period in order to dequeue multiple frame references. AFQs are serialized and thus require a lock for exclusive access. As a result, dequeuing multiple frames requires holding the AFQ serialization for an increased period. If there are multiple waiting frame requests, which may be made by different threads, for example, other frame requests may be forced to wait for an increased period while multiple frames are dequeued from the AFQ.